UBASIC/Scripts: yet another accurate intervalometer
yet another accurate intervalometer (new version, may need a non-official CHDK build) :Written for/on: Powershot A710 :Also works on: Should work on any VxWorks DIGIC II -cam without modifications, needs to be modified for at least DRYOS-cams. (uses property cases, see the script) :Required CHDK build: Anything recent with get_exp_count Script version 20080419 Quite simple bloated & accurate(ish) intervalometer. Sequences (=1 shot and up) are triggered every specified interval (or - if not possible - (almost) as fast as possible) rather than after waiting the specified time. The length of a sequence can be measured by exposures or time. Same goes for the entire intervalometering. Should be quite self-explanatory. (Naturally this script can be used for bracketing, e.g. HDR stacking. Just set the appropriate bracketing in CHDK menu.) Hope this is confusing enough... Feel free to contribute. Script Code (save as "yaaintrlmtr.bas" to your /SCRIPTS/ folder) @title yet another accurate intervalometer @param a Duration (min)/-1 disable @default a -1 @param b Duration (sec)/n of seqs @default b 5 @param c Delay 1st sequence (min) @default c 0 @param d Delay 1st sequence (sec) @default d 3 @param e Trigger every n min @default e 0 @param f ...every n sec @default f 3 @param g ...every .n sec @default g 0 @param h Endless? @default h 0 @param i Seq dur (m)/-1 @default i -1 @param j Seq dur (s)/n of shots/seq @default j 1 rem different propcases for DIGIC II/III rem S(hooting in progress-propcase): rem for DIGIC II: 205, DIGIC III: 206 S=205 rem D(rive mode -property case) - II:6, III:102? rem C(ontinuous-value for drive mode) - II:1, III:? D=6 C=1 if a<-1 then a=-1 if (a>-1 and b<0) then b=0 if (a=-1 and b<1) then b=1 if c<0 then c=0 if d<0 then d=0 if e<0 then e=0 if f<0 then f=0 if g<0 then g=0 if (h<0 or h>1) then h=0 if i<-1 then i=-1 if (i>-1 and j<0) then j=0 if (i=-1 and j<1) then j=1 if ((i=-1 and j>1) or i>-1) then get_prop D P if P<>C then print "set drive mode" print "to continuous" goto "almost_there" endif endif if a>-1 then b=a*60000+b*1000 d=c*60000+d*1000 if g<0 then g=e*60000+f*1000+g*10 else g=e*60000+f*1000+g*100 if i>-1 then j=i*60000+j*1000 e=get_tick_count print "waiting " d/1000 " sec" d=d+e while e-1 then goto "do_by_duration" :shoot_by_numbers e=get_tick_count z=0 do z=z+1 f=e+g print "sequence " z " of " b if i=-1 then gosub "sub_shoot_count" if i>=0 then gosub "sub_shoot_tick" while (e=b goto "almost_there" :do_by_duration e=get_tick_count b=b+e do f=e+g if i=-1 then gosub "sub_shoot_count" if i>=0 then gosub "sub_shoot_tick" a=get_tick_count print (b-a)/1000 " sec to go" while (e=b goto "almost_there" :do_forever e=get_tick_count b=e z=0 do z=z+1 f=e+g print "sequence " z if i=-1 then gosub "sub_shoot_count" if i>=0 then gosub "sub_shoot_tick" a=get_tick_count print (a-b)/1000 " sec elapsed" while (e1 :almost_there end :sub_shoot_count C=get_exp_count press "shoot_half" press "shoot_full" do D=get_exp_count until (D-C)>=j release "shoot_full" do get_prop S P until P=0 return :sub_shoot_tick e=get_tick_count F=e+j press "shoot_half" press "shoot_full" while (e Jucifer 17:13, 19 April 2008 (UTC) yet another accurate intervalometer (old version) :Written for/on: Powershot A710 :Also works on: Should work on A6x0 and S3. :Required CHDK build: Fingalo's ver 121 and up Script version 20071231. (Not extensively) tested OK with (slightly modified) Fingalo's ver 128 (needs get_tick_count and a couple of constructs). Quite simple & accurate(ish) intervalometer. Shots are triggered every specified interval (or - if not possible - (almost) as fast as possible) rather than after waiting the specified time. Should be quite self-explanatory. One can either set a number of photos to shoot or a duration (min+sec) which to shoot photos for. Hope this is confusing enough... Feel free to contribute. Script Code (save as "yaaintrlmtr.bas" to your /SCRIPTS/ folder) @title yet another accurate intervalometer @param a Duration (min)/-1 disable @default a -1 @param b Duration (sec)/n of shots @default b 5 @param c Delay 1st Shot (min) @default c 0 @param d Delay 1st Shot (sec) @default d 0 @param e Trigger every n min @default e 0 @param f ...every n sec @default f 0 @param g ...every .n sec @default g 5 @param h Endless? @default h 0 if a<-1 then a=-1 if (a>-1 and b<0) then b=0 if (a=-1 and b<1) then b=1 if c<0 then c=0 if d<0 then d=0 if e<0 then e=0 if f<0 then f=0 if g<0 then g=0 if (h<0 or h>1) then h=0 if a>-1 then b=a*60000+b*1000 d=c*60000+d*1000 if g<0 then g=e*60000+f*1000+g*10 else g=e*60000+f*1000+g*100 e=get_tick_count print "waiting " d/1000 " sec" d=d+e while e-1 then goto "do_by_duration" :shoot_by_numbers e=get_tick_count z=0 do z=z+1 f=e+g print "shot " z " of " b shoot while (e=b goto "almost_there" :do_by_duration e=get_tick_count b=b+e do f=e+g shoot a=get_tick_count print (b-a)/1000 " sec to go" while (e=b goto "almost_there" :do_forever e=get_tick_count b=e z=0 do z=z+1 f=e+g print "shot " z shoot a=get_tick_count print (a-b)/1000 " sec elapsed" while (e1 :almost_there end --Jucifer 18:03, 31 December 2007 (UTC) yet another accurate intervalometer Category:Intervalometer